]> dgit.raspbian.org Git - openjdk-25.git/commitdiff
Makes the generated module-info.java files reproducible (removes a captured build...
authorEmmanuel Bourg <ebourg@apache.org>
Wed, 22 Jul 2026 00:23:02 +0000 (12:23 +1200)
committerVladimir Petko <vladimir.petko@canonical.com>
Wed, 22 Jul 2026 00:23:02 +0000 (12:23 +1200)
Forwarded: no

Gbp-Pq: Name reproducible-module-info.diff

make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java

index 82bd065efcefb9a025962dee594b21cd82aa0965..fce223cefc0ba62397aa122fbd87ba10a39571fb 100644 (file)
@@ -156,9 +156,10 @@ public class GenModuleInfoSource {
                 if (l.trim().startsWith("module ")) {
                     if (debug) {
                         // print URI rather than file path to avoid escape
-                        writer.format("    // source file: %s%n", sourceFile.toUri());
+                       String buildPath = System.getProperty("user.dir").replaceAll("make$", "");
+                       writer.format("    // source file: %s%n", sourceFile.toUri().toString().replace(buildPath, ""));
                         for (Path file : extraFiles) {
-                            writer.format("    //              %s%n", file.toUri());
+                           writer.format("    //              %s%n", file.toUri().toString().replace(buildPath, ""));
                         }
                     }
                     break;